package com.wbl.tijianssm.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wbl.tijianssm.mapper.CheckitemMapper;
import com.wbl.tijianssm.mapper.SetmealdetailedMapper;
import com.wbl.tijianssm.pojo.Checkitem;
import com.wbl.tijianssm.pojo.Hospital;
import com.wbl.tijianssm.pojo.Setmeal;
import com.wbl.tijianssm.pojo.Setmealdetailed;
import com.wbl.tijianssm.response.ApiRestResponse;
import com.wbl.tijianssm.service.CheckitemService;
import com.wbl.tijianssm.service.SetmealService;
import com.wbl.tijianssm.mapper.SetmealMapper;
import com.wbl.tijianssm.service.SetmealdetailedService;
import com.wbl.tijianssm.vo.SetmealVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.ArrayList;
import java.util.List;

/**
* @author yy
* @description 针对表【setmeal】的数据库操作Service实现
* @createDate 2024-09-18 10:09:07
*/
@Service
public class SetmealServiceImpl extends ServiceImpl<SetmealMapper, Setmeal>
    implements SetmealService{

    @Autowired
    SetmealMapper setmealMapper;


    @Override
    public ApiRestResponse getSetmeallList(Setmeal setmeal) {
        List<Setmeal> setmeals= setmealMapper.selectAllWithDetails(setmeal.getType());
        return ApiRestResponse.success(setmeals);
    }

    @Override
    public ApiRestResponse getSetmealDetail(Setmeal setmeal) {
        Setmeal sm = setmealMapper.selectdetailById(setmeal.getSmid());
        return ApiRestResponse.success(sm);
    }


}




